All Questions
38 questions
2votes
1answer
73views
repllib.java - a tiny Java library for implementing simple REPL (Read, Evaluate, Print, Loop) programs
I have this GitHub repository - repllib.java. Basically, it's a simple class library for coding REPL functionality with simple format. A typical session may look like this: ...
7votes
3answers
722views
Polynomial.java - a Java class for dealing with polynomials with BigDecimal coefficients
(You can find multiplication algorithms in Polynomial.java - multiplication algorithms: naïve, Karatsuba, FFT.) Intro This post presents the main class (Polynomial) ...
5votes
2answers
746views
Polynomial.java - A tiny Java library for dealing with polynomials with double coefficients
Intro This time, I have produced Polynomial.java. It is a simple polynomial class that stores its coefficients as double values in an array. Code ...
1vote
2answers
154views
Fully generic, very efficient bidirectional Dijkstra's algorithm in Java
After finding out that my previous implementations are incorrect, I decided to give it another try. I relied on this post. (The entire project resides in this GitHub repository. Contains some unit ...
3votes
3answers
228views
A simple message bus in Java
Now I have this simple message bus in Java. This one is as simplistic as I could get. Code com.github.coderodde.messagebus.AbstractMessageConsumer.java: ...
5votes
2answers
524views
Generic matrix library in Java
I have this repository. The most important source files follow. com.github.coderodde.math.linear.matrix.AbstractMatrix.java: ...
3votes
5answers
565views
Frame Strings that contain newlines
I have an application where I need to highlight some information that is printed to the console, so I wrote some static library methods which do that. I tested for bugs. Is my code clean and ...
3votes
3answers
196views
Comparing 8 different Disjoint-Set data structure variants in Java
The Wikipedia page on Disjoint-Set data structures presents \$4\$ distinct algorithms for finding the root node of the tree, and \$2\$ distinct algorithms for performing the union operation. In this ...
1vote
1answer
735views
GeekTrust: Tame of Thrones OO
I am trying to solve a problem on GeekTrust, called Tame of Thrones (here) Shan, the gorilla king of the Space kingdom wants to rule all Six Kingdoms in the universe of Southeros. There is no ...
4votes
4answers
159views
Statistics Library with Sample, SampleBuilder and Tests
Introduction I'm working on a Statistics Library that can record observations and produce a Summary of the statistics when there's enough observations. Right now, it's at its early stages and is ...
2votes
1answer
445views
Redis work queue processor
I frequently encounter the need for creating services that concurrently process messages from Redis queues. So I decided to share the knowledge I learned and help others easily bootstrap such a ...
3votes
1answer
643views
Ring buffer with random access
I had an application where I really wanted a double-ended queue that supports random access. Java's ArrayDeque would have been perfect, except that it doesn't ...
3votes
3answers
461views
A tiny Java library for generating Gray codes
This library is for generating Gray codes. A Gray code over \$n\$ bits is a list of \$2^n\$ different \$n\$-bit strings subject to the following constraint: two adjacent bit string differ in only one ...
3votes
2answers
625views
Comparing Dijkstra's SSSP algorithm against Bellman-Ford in Java
Single source shortest path In SSSP, we choose a node \$s\$ and we compute all the shortest path starting from \$s\$ towards all other nodes, thus computing a shortest path tree. Two most classical ...
3votes
0answers
1kviews
A Java library for simulating logic circuits
I have this Java library for building logic circuits and running binary data through them: AbstractCircuitComponent.java ...